﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="ExportRevenueDetail.aspx.cs" Inherits="Admin_ExportRevenueDetail" Title="" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <style type="text/css">
        .style1
        {
        }
        .style2
        {
            width: 179px;
        }
        .style3
        {
            width: 120px;
        }
        .style4
        {
            width: 230px;
            height: 43px;
        }
        .style5
        {
            width: 179px;
            height: 43px;
        }
        .style6
        {
            height: 43px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table style="width: 100%;">
        <tr>
            <td class="style3">
                <asp:Label ID="Label1" runat="server" Text="From date"></asp:Label>
            </td>
            <td class="style5">
                <asp:TextBox ID="txtfromdate" runat="server" CssClass="datepicker text-input"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ReqVal_dataGrnDate" ValidationGroup="Main" runat="server"
                    Display="Dynamic" ControlToValidate="txtfromdate" ErrorMessage="Required"></asp:RequiredFieldValidator>
            </td>
            <td class="style6">
            </td>
        </tr>
        <tr>
            <td class="style3">
                <asp:Label ID="Label2" runat="server" Text="To date"></asp:Label>
            </td>
            <td class="style2">
                <asp:TextBox ID="txttodate" runat="server" CssClass="datepicker text-input"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationGroup="Main" runat="server"
                    Display="Dynamic" ControlToValidate="txttodate" ErrorMessage="Required"></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="center" class="style1" colspan="2">
                <asp:Button ID="btnview" runat="server" Text="View" CssClass="button" ValidationGroup="Main"
                    OnClick="btnview_Click" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="DetailDataSource"
        AllowMultiColumnSorting="False" AllowPaging="True" ExcelExportFileName="Export_DrugList.xls"
        AllowExportToExcel="True" AllowSorting="True" ExportToExcelText="Excel" PageSelectorPageSizeInterval="10"
        RecordsCount="0" ShowGridOnEmptyData="False">
        <Columns>
            <asp:BoundField DataField="PrescriptionId" HeaderText="PrescriptionId" SortExpression="PrescriptionId" />
            <asp:BoundField DataField="DeliveryDate" HeaderText="DeliveryDate" SortExpression="DeliveryDate" />
            <asp:BoundField DataField="PatientCode" HeaderText="PatientCode" SortExpression="PatientCode" />
            <asp:BoundField DataField="PatientName" HeaderText="PatientName" SortExpression="PatientName" />
            <asp:BoundField DataField="DrugId" HeaderText="DrugId" SortExpression="DrugId" />
            <asp:BoundField DataField="DrugName" HeaderText="DrugName" SortExpression="DrugName" />
            <asp:BoundField DataField="Unit" HeaderText="Unit" SortExpression="Unit" />
            <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
            <asp:BoundField DataField="CostPrice" HeaderText="CostPrice" SortExpression="CostPrice"
                DataFormatString="{0:#,##0.00}">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="SellPrice" HeaderText="SellPrice" SortExpression="SellPrice"
                DataFormatString="{0:#,##0.00}">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
            <asp:BoundField DataField="ExpDate" HeaderText="ExpDate" SortExpression="ExpDate" />
            <asp:BoundField DataField="BatchLot" HeaderText="BatchLot" SortExpression="BatchLot" />
        </Columns>
        <EmptyDataTemplate>
            <b>No Invoices Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <asp:HiddenField ID="hf_DetailWhereClause" runat="server" />
    <br />
    <data:DeliveryNoteDetailsDataSource ID="DetailDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True" OnSelecting="DetailDataSource_Selecting">
        <Parameters>
            <asp:ControlParameter Name="WhereClause" ControlID="hf_DetailWhereClause" />
            <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:DeliveryNoteDetailsDataSource>
</asp:Content>
